package yf.mall.dao;

import org.apache.ibatis.annotations.Param;
import yf.mall.entity.SysUsersEntity;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;

import java.util.List;

/**
 * 系统用户Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Sun Jun 28 17:37:34 CST 2020
 */
@Mapper
public interface SysUsersDao extends BaseDao<SysUsersEntity> {

    /**

        List<SysUserVo> queryListVo(SysUserVo sysUserVo);

        SysUserVo getVo(Long id);

    **/
   void saveUserIdAndSysUserId(@Param("sys_user_id")Long sys_user_id, @Param("user_id")Long user_id);

   void updateBySysUserId(@Param("sys_user_id")Long sys_user_id, @Param("user_id")Long user_id);

    Long findBySysUserId(Long sys_user_id);

    List<Long> findByUserId(Long user_id);

    void delBySysUserId( Long sys_user_id);

    void delByUserId( Long userId);

    SysUsersEntity findByUserName(String userName);

    void saveRole(@Param("userId") Long userId,@Param("roleId") Long roleId);

    void updateStatus(Long sys_userId);

    List<Long> findRole(Long sysUserId);

    List<SysUsersEntity> findByShopName(@Param("shopName")String shopName,@Param("status")Integer status,
                                        @Param("username")String username,@Param("mobile")String mobile);
}
